package com.ssm.entity.system;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.ssm.entity.Base;

public class Operator extends Base {
	
	/**
	 * 编号/用户名
	 */
	private String id;
	
	/**
	 * 密码
	 */
	private String pwd;
	
	/**
	 * 姓名
	 */
	private String name;
	
	/**
	 * 性别[1男  2女]
	 */
	private Integer sex;
	
	/**
	 * 出生日期
	 */
	@DateTimeFormat(pattern="yyyy/MM/dd")
	private Date birthDate;
	
	/**
	 * 状态[1正常  2禁用]
	 */
	private Integer state = 1;
	
	/**
	 * 住址
	 */
	private String address;
	
	/**
	 * 手机
	 */
	private String mobile;
	
	/**
	 * 电话
	 */
	private String phone;
	
	/**
	 * 角色编号
	 */
	private String roleId;
	
	/**
	 * 创建人
	 */
	private String creater;
	
	/**
	 * 创建时间
	 */
	private Date createTime;
	
	/**
	 * 本次登录时间
	 */
	private Date loginTime;
	
	/**
	 * 上次登录时间
	 */
	private Date lastLoginTime;
	
	/**
	 * 上线IP
	 */
	private String loginIp;
	
	/**
	 * 登录次数
	 */
	private Integer loginCount = 0;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public Integer getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(Integer loginCount) {
		this.loginCount = loginCount;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Operator [id=").append(id).append(", pwd=").append(pwd)
				.append(", name=").append(name).append(", sex=").append(sex)
				.append(", birthDate=").append(birthDate).append(", state=")
				.append(state).append(", address=").append(address)
				.append(", mobile=").append(mobile).append(", phone=")
				.append(phone).append(", roleId=").append(roleId)
				.append(", creater=").append(creater).append(", createTime=")
				.append(createTime).append(", loginTime=").append(loginTime)
				.append(", lastLoginTime=").append(lastLoginTime)
				.append(", loginIp=").append(loginIp).append(", loginCount=")
				.append(loginCount).append("]");
		return builder.toString();
	}
}
